package interfaz;

import org.uqbar.arena.actions.MessageSend;
import org.uqbar.arena.layout.HorizontalLayout;
import org.uqbar.arena.layout.VerticalLayout;
import org.uqbar.arena.widgets.Button;
import org.uqbar.arena.widgets.Label;
import org.uqbar.arena.widgets.Panel;
import org.uqbar.arena.widgets.TextBox;
import org.uqbar.arena.windows.MainWindow;
import org.uqbar.arena.windows.SimpleWindow;
import org.uqbar.arena.windows.WindowOwner;

import adapter.MesaAdapter;

import adapter.MesaAdapter;
import Ruleta.Ruleta;


public class NoVaMasWindow extends SimpleWindow<MesaAdapter> {

	public static final String PAGARAPUESTAS = "pagarApuestas";
	
	public NoVaMasWindow(WindowOwner parent, MesaAdapter model) {
		super(parent, model);

	}
	
	@Override
	protected void addActions(Panel actionsPanel) {
		
		Button girar = new Button(actionsPanel);
		girar.setCaption("Pagar Apuestas");
		girar.onClick(new MessageSend(this, PAGARAPUESTAS));
	}

	@Override
	protected void createFormPanel(Panel mainPanel) {
		
		mainPanel.setLayout(new VerticalLayout());
		
		Label salioEl = new Label(mainPanel);
		salioEl.setText("Salio el: " );

		
		Label resultadoRuleta = new Label(mainPanel);
		resultadoRuleta.bindValueToProperty(MesaAdapter.NUMEROACTUAL);
		
	}
	
	public void pagarApuestas(){
		
		this.getModel().pagarApuestas();
		this.close();
		
	}

}
